﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 属性
{
    public class Car
    {
        public IEngine Engine { get; set; }
        public void Drive()
        {
            this.Engine?.Start();
            Debug.WriteLine("Car is driving.");
        }
    }
}
